package kr.or.javacafe.app01.service;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.StringReader;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;

import kr.or.javacafe.app01.domain.CodeMaster;
import kr.or.javacafe.app01.domain.CodeSlave;
import kr.or.javacafe.app01.repository.CodeMasterRepository;
import kr.or.javacafe.demo.domain.RankData;
import kr.or.javacafe.demo.domain.RssData;
import kr.or.javacafe.demo.domain.mongo.AccessLog;
import kr.or.javacafe.demo.domain.mongo.StudyMember;
import kr.or.javacafe.demo.domain.mongo.TwitterRawData;
import kr.or.javacafe.demo.domain.mongo.TwitterWord;
import kr.or.javacafe.demo.domain.rank.Rank;
import kr.or.javacafe.demo.domain.rss.Rss;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.methods.GetMethod;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.type.TypeReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import org.xml.sax.InputSource;




@Service
public class CodeMasterService {

	static Logger logger = LoggerFactory.getLogger(CodeMasterService.class);

	@Autowired
	private CodeMasterRepository codeMasterRepository;

	

	public List<CodeMaster> findCodeMasterList() {
		return codeMasterRepository.selectCodeMasterList();
	}
	
	public List<CodeSlave> findCodeSlaveList(String mcode) {
		return codeMasterRepository.selectCodeSlaveList(mcode);
	}
	
}
























